package com.up.interview.redis.redisson;

import java.util.concurrent.TimeUnit;

/**
* @author: liuchengjun
* @title: DistributedLock
* @projectName: 海联技术中台V2.0
* @depart  软件事业部
* @description: 
* @date: 2025/10/20/周一 15:54 (星期一)
* @since V2.0
*/
public interface DistributedLock {
    /**
     * 获取锁
     */
    void lock(String lockKey);

    /**
     * 尝试获取锁
     */
    boolean tryLock(String lockKey, long waitTime, long leaseTime, TimeUnit unit) throws InterruptedException;

    /**
     * 释放锁
     */
    void unlock(String lockKey);
}
